using System;
using System.Data;
using NCS.Library.Components.Providers;
using NCS.Module.Multimedia.Library.Bonus;
using NCS.Module.Multimedia.Library.Gallery;
using NCS.Module.Multimedia.Library.Video;

namespace NCS.Module.Multimedia.Library.Providers
{
	public abstract class DataAccessProvider
	{
		private static DataAccessProvider objProvider;
		public static DataAccessProvider instance()
		{
			if (objProvider == null)
			{
				DataAccessProviderConfiguration objConfig = DataAccessProviderConfiguration.GetDataAccessProviderConfiguration();
				Provider defaultProvider = (Provider)objConfig.Providers[objConfig.DefaultProvider];
                Provider provider = new Provider(defaultProvider.ProviderName, "NCS.Module.Multimedia.Library.Providers." + defaultProvider.ProviderName, defaultProvider.ConnectionString);
				objProvider = (DataAccessProvider) DataAccessProviderFactory.CreateDataAccess(provider);
			}
			return objProvider;
		}
	    //cate bonus
        public abstract DataTable GetCateBonus();

        public abstract DataTable GetAllCateBonus();

        public abstract DataTable GetAllCateBonusbyOther(string txtSearch, DateTime fromdate, DateTime todate, int userid);

        public abstract DataTable GetCateBonusByNum(int num);

        public abstract DataTable GetAllCateBonusByParentID(int _catebonus_parentID);

        public abstract DataTable GetAllCateBonusByParentID(int _catebonus_parentID, int portalid, int pagesize, int currpage, out int totalRecord);

        public abstract void SetCateBonusIndex(int id, int index);

        public abstract void SetCateBonusRank(int id, int rank);

        public abstract void SetCateBonusStatus(int id, bool status);

        public abstract void DeleteCateBonus(int _catebonus_ID);

        public abstract int InsertCateBonus(Gallery_CateBonusInfo _catebonusInfo);

        public abstract void UpdateCateBonus(Gallery_CateBonusInfo _catebonusInfo);

        public abstract Gallery_CateBonusInfo GetCateBonus(int _catebonus_ID);

        public abstract Gallery_CateBonusInfo GetCateBonusByOtherID(int otherid);

	    //bonus
        public abstract DataTable GetBonus();

        public abstract DataTable GetAllBonus();

        public abstract DataTable GetAllBonusByKey(string txtSearch, DateTime fromdate, DateTime todate, int userid);
	    
        public abstract DataTable GetAllBonusByNum(int num);

        public abstract DataTable GetAllAlbumbyOther(string txtSearch, DateTime fromdate, DateTime todate, int userid);

        public abstract DataTable GetAllAlbumbyOther();

        public abstract DataTable GetAllCateBonusID(int _catebonus_parentID);

        public abstract DataTable GetTopBonus(int num, int type);

        public abstract DataTable GetTopBonus(int portalid, int pagesize, int currpage, out int totalRecord, int type);
        
        public abstract void SetBonusIndex(int id, int index);

        public abstract void SetBonusRank(int id, int rank);

        public abstract void SetBonusStatus(int id, bool status);

        public abstract void DeleteBonus(int _bonus_ID);

        public abstract int InsertBonus(Gallery_BonusInfo _bonusInfo);

        public abstract void UpdateBonus(Gallery_BonusInfo _bonusInfo);

        public abstract Gallery_BonusInfo GetBonus(int _bonus_ID);

	    //album
	    
        public abstract DataTable GetAlbum();

        public abstract string GetAlbumName(int albumid);
        
        public abstract DataTable GetAllAlbum();
        public abstract DataTable GetAllAlbum(int start, int end, int total);

        public abstract DataTable GetAllGalleryByKey(string txtSearch, DateTime fromdate, DateTime todate, int userid);
	    
        public abstract DataTable GetAlbumByNum(int num);

        public abstract DataTable GetAllAlbumByParentID(int _album_parentID);

        public abstract DataTable GetAllAlbumByParentID(int _album_parentID, int portalid, int pagesize, int currpage, out int totalRecord);

        public abstract void SetAlbumIndex(int id, int index);

        public abstract void SetAlbumRank(int id, int rank);

        public abstract void SetAlbumStatus(int id, bool status);

        public abstract void DeleteAlbum(int _album_ID);

        public abstract int InsertAlbum(Gallery_AlbumInfo _albumInfo);

        public abstract void UpdateAlbum(Gallery_AlbumInfo _albumInfo);

        public abstract Gallery_AlbumInfo GetAlbum(int _album_ID);

        public abstract Gallery_AlbumInfo GetAlbumByOtherID(int otherid);

        //picture
        public abstract void Picture_Update(PictureInfo picture);
        public abstract void Picture_Delete(int picid);
        public abstract PictureInfo GetPicture(int picid);
        public abstract int Picture_Insert(PictureInfo picture);
        public abstract DataTable Picture_GetAll(int portalid);
        public abstract DataTable Picture_GetAllByAlbumID(int albumid);
        public abstract DataTable Picture_GetAllByAlbumIDAndVisible(int albumid, int visible);
        public abstract void Picture_SetIndex(int picid, int index);

        //album video
        public abstract DataTable GetAlbumVideo();
        public abstract string GetAlbumVideoName(int albumid);
        public abstract DataTable GetAllAlbumVideo();
        public abstract DataTable GetAllAlbumVideo(int start, int end, int total);
        public abstract DataTable GetAllVideoByKey(string txtSearch, DateTime fromdate, DateTime todate, int userid);
        public abstract DataTable GetAlbumVideoByNum(int num);
        public abstract DataTable GetAllAlbumVideoByParentID(int _album_parentID);
        public abstract DataTable GetAllAlbumVideoByParentID(int _album_parentID, int portalid, int pagesize, int currpage, out int totalRecord);
        public abstract DataTable GetAllAlbumVideobyOther(string txtSearch, DateTime fromdate, DateTime todate, int userid);
        public abstract DataTable GetAllAlbumVideobyOther();
        public abstract void SetAlbumVideoIndex(int id, int index);
        public abstract void SetAlbumVideoRank(int id, int rank);
        public abstract void SetAlbumVideoStatus(int id, bool status);
        public abstract void DeleteAlbumVideo(int _album_ID);
        public abstract int InsertAlbumVideo(Video_AlbumInfo _albumInfo);
        public abstract void UpdateAlbumVideo(Video_AlbumInfo _albumInfo);
        public abstract Video_AlbumInfo GetAlbumVideo(int _album_ID);
        public abstract Video_AlbumInfo GetAlbumVideoByOtherID(int otherid);

        //clip
        public abstract void Clip_Update(ClipInfo clip);
        public abstract void Clip_Delete(int clipid);
        public abstract ClipInfo GetClip(int clipid);
        public abstract int Clip_Insert(ClipInfo clip);
        public abstract DataTable Clip_GetAll(int portalid);
        public abstract DataTable Clip_GetAllByAlbumID(int albumid);
        public abstract DataTable Clip_GetAllByAlbumIDAndVisible(int albumid, int visible);
        public abstract void Clip_SetIndex(int clipid, int index);
    }
}
